package com.chang.bootplus.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.chang.bootplus.base.database.EntityBase;

import java.time.LocalDateTime;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.jetbrains.annotations.NotNull;

/**
 * <p>
 *
 * </p>
 *
 * @author chang
 * @since 2022-01-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Menu对象", description = "")
public class Menu extends EntityBase {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("父级菜单")
    private Long parentId;

    private String name;

    @ApiModelProperty("菜单url")
    private String path;


    @ApiModelProperty("标签")
    private String label;


    private String perms;

    @ApiModelProperty("头像url")
    private String icon;

    @ApiModelProperty("排序字段")
    private Integer sorted;

    private Integer status;


    @ApiModelProperty("组件类型：类型     0：目录   1：菜单   2：按钮")
    private Integer type;

    @TableField(exist = false)
    private List<Menu> children;

}
